package hg;

import java.util.Arrays;
import java.util.Scanner;

class Rectangle{
	private int width;
	private int length;
	
	public Rectangle(int width,int length){
	this.width=width;
	this.length=length;
	}
	
@Override
	public String toString() {
		return "Rectangle [width=" + width + ", length=" + length + "]";
	}

	public int getPerimeter(){	
		return (width+length)*2;
	}
	
	public int getArea(){	
		return width*length;
	}

}
class Circle{
	private int radius;
	
	public Circle(int radius){
	this.radius=radius;
	}

	@Override
	public String toString() {
		return "Circle [radius=" + radius + "]";
	}
	
	public int getPerimeter(){
		return (int) (2*radius*Math.PI);
	}
	
	public int getArea(){	
		return (int) (radius*radius*Math.PI);
	}
	
}
public class M0303 {
	public static void main(String[] args){
		Scanner in = new Scanner(System.in); 
		Rectangle[] rectangles=new Rectangle[2];
		Circle[] circle=new Circle[2];
		rectangles[0]=new Rectangle(in.nextInt(),in.nextInt());
		rectangles[1]=new Rectangle(in.nextInt(),in.nextInt());
		circle[0]=new Circle(in.nextInt());
		circle[1]=new Circle(in.nextInt());
        System.out.println(rectangles[0].getPerimeter()+rectangles[1].getPerimeter()+circle[0].getPerimeter()+circle[1].getPerimeter());
        System.out.println(rectangles[0].getArea()+rectangles[1].getArea()+circle[0].getArea()+circle[1].getArea());
        System.out.println(Arrays.toString(rectangles));
        System.out.println(Arrays.toString(circle));
	}

}
